﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CRM.Controller;
using CRM.Entity.Extra;

namespace CRM.Web.Admin
{
    public partial class EstateCase : System.Web.UI.Page
    {
        ArticleInfoController articleInfoController = new ArticleInfoController();
        public string pics = "''";
        public string links = "''";
        public string texts = "''";
        protected void Page_Load(object sender, EventArgs e)
        {
            pics = "'images/EstateCasePic/1.jpg'" + "+ '|' +" + "'images/EstateCasePic/2.jpg'" + " + '| '+" + "'images/EstateCasePic/3.jpg'" + "+ '| '+" + "'images/EstateCasePic/4.jpg'";
            //links = "'Img.aspx'" + "+ '|' +" + "'1/4.jpg'" + " + '| '+" + "'1/2.jpg'" + "+ '| '+" + "'1/3.jpg'";
            //texts = "'标题'" + "+ '|' +" + "'1/4.jpg'" + " + '| '+" + "'1/2.jpg'" + "+ '| '+" + "'1/3.jpg'";
            if (!IsPostBack)
            {
                BindData();
            }
        }

        protected void BindData()
        {
            var pageIndex = 1;
            var pageSize = 20;
            var pageInfo = new PageInfo()
            {
                PageIndex = pageIndex,
                PageSize = pageSize
            };

            var articleInfo = articleInfoController.GetListExtra(pageInfo, 2);
            if (articleInfo.ListEntity != null)
            {                
                this.rpEstateCaseList.DataSource = articleInfo.ListEntity;
                this.rpEstateCaseList.DataBind();
            }
        }
    }
}